<template>
  <div class="plan hideScrollBar">
    <!-- 导航 -->
    <NavBar :title="detail.title || ''" isFixed />
    <!-- 内容部分 -->
    <div v-if="detail" class="content" v-html="detail.content"></div>
    <div v-else class="content">{{ $t("lotteryMoney.zwsj") }}</div>
  </div>
</template>
<script setup>
import { getArticleDetail } from "@/api/bdc";
const route = useRoute(); // 路由
const detail = ref({
  title: "",
});
onBeforeMount(() => {
  if (route.query.id) {
    getArticleDetail({ id: route.query.id }).then((res) => {
      // console.log("--文章详情--", res);
      detail.value = res;
    });
  }
});
</script>
<style lang="scss" scoped>
.plan {
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;

  .content {
    padding: 30px;
    background: #fff;
  }
}
</style>
